name = ("柯南",)  # 如果元组只有一个元素，需要添加逗号
print(name)
print(name,type(name))

name = ("柯南", "毛利", "柯南", "古巨基")
print(name)
print(name,type(name))

#API
print(name.count("柯南"))  #count表示数量
print(name.index("毛利"))  #index索引位置

print("-----------------------------------------组包和解包")

names = "鸣人", "小樱", "佐助"  #实际返回元组
print(names,type(names))    

#组包
stu = "黑红",91,170.5
#解包
name,age,height = stu
print("name: {} age: {} height: {} ".format(name,age,height))

print("---------------------------数据交换")
a = 3
b = 5
b,a = a,b
print(a,b)
 


